{if $defaultValue}
	{assign var="value" value="{$defaultValue}"}
{else}
	{assign var="value" value="{$element->value}"}
{/if}

{if $class}
<p class="{$class}">
{else}
<p>
{/if}
	{if $element->type == 'text' || $element->type == 'password'}
		<label for="{$element->name}">{$element->label|ucfirst}:<br />
			<input type="{$element->type}" value="{$value}" class="input" id="{$element->name}" name="{$element->name}" />
		</label>
	{elseif $element->type == 'checkbox'}
		{if $element->value != null}
			{assign var="checked" value="checked"}
		{else}
			{assign var="checked" value=""}
		{/if}
		<label for="{$element->name}">
			<input type="{$element->type}" value="{$value}" id="{$element->name}" name="{$element->name}" {$checked}/> {$element->label|ucfirst}
		</label>
	{elseif $element->type == 'submit'}
		<input type="{$element->type}" value="{$element->label|ucfirst}" name="{$element->name}" />
	{/if}
	{if $errorsEnable}
		{* TODO: show errors *}
	{/if}
</p>